<template>
    <div class="dayLiu">
        <h1>第六题</h1>
        <div class="box">
            <p>测试题</p>
            <li v-for="val, i in shuzu" :key="i">
                {{ val.num }}
            </li>
            

        </div>
    </div>
</template>

<script>
export default {
    name: 'dayLiuIndex',
    data() {
        return {
            shuzu: []
        }
    },
    created() {
        this.fn()
    },
    methods: {
        jisuan() {
            function fn(a, b) {
                return Math.floor(Math.random() * (b - a + 1)) + a
            }
            return fn(0, 10)
        },
        fn() {
            let a = []
            for (var i = 0; i < 10; i++) {
                let sj = this.jisuan()
                console.log(sj);
                let obj = {
                    num: `<p>${sj}+${sj}</p>`
                }
                console.log(obj);
            }
        }
    }
}
</script>

<style scoped>
.box {
    width: 800px;
    height: 500px;
    background-color: rgb(170, 194, 214);
    margin: auto;
}
</style>